﻿using System.Collections.Generic;
using Microsoft.Extensions.Options;

namespace CenterServerDemo
{

    public class OptionsPort
    {
        public int PubPort { get; set; } = 1235;
       
        

       
    }
    
    
    public class OptionsRemoteServer
    {
        public List<RemoteServer>  Server { get; set; }=new List<RemoteServer>();

         

        
    }

    public class RemoteServer
    {
        public  string  Url { get; set; } 
        public int    Port { get; set; }

        public string Key => $"{Url}_{Port}";

        public RemoteServer(string url, int port)
        {
            this.Url = url;
            this.Port = port;
        }

        public List<TopicType> TopicTypes { get; set; } = new List<TopicType>();
    }

    public class TopicType
    {
        
        public  string Topic { get; set; }
        public  bool   Next { get; set; }
        public  string NextTopic { get; set; }
    }
    
}